package com.tjec.project.system.domain;

import com.tjec.framework.aspectj.lang.annotation.Excel;
import com.tjec.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

/**
 * 部门表 sys_dept
 *
 * @author tjec
 */
public class SysDept extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 部门ID
     */
    private String deptId;

    /**
     * 父部门ID
     */
    private String parentId;

    /**
     * 祖级列表
     */
    private String ancestors;

    /**
     * 部门名称
     */
    @Excel(name = "业务部门名称")
    private String deptName;

    /**
     * 部门简称
     */
    @Excel(name = "部门简称")
    private String deptShortName;

    /**
     * 所属业务所（从字典中获取）
     */

    private String whatBusiness;
    /**
     * 所属业务所名称
     */
    @Excel(name = "所属业务所")
    private String whatBusinessName;

    /**
     * 显示顺序
     */
    @Excel(name = "排序编号")
    private String orderNum;

    /**
     * 负责人
     */
    private String leader;
    /**
     * 业务所负责人
     */
    private String whatBusinessLeader;
    /**
     * 负责人
     */
    private String[] leaders;
    /**
     * 负责人名称
     */
    @Excel(name = "业务部门负责人")
    private String leadersName;
    /**
     * 业务所负责人
     */
    private String[] whatBusinessLeaders;
    /**
     * 业务所负责人名称
     */
    @Excel(name = "业务所负责人")
    private String whatBusinessLeadersName;

    /**
     * 联系电话
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 部门状态:0正常,1停用
     */
    private String status;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 父部门名称
     */
    private String parentName;

    /**
     * 唯一guid
     */
    private String guid;

    /**
     * 组织编码
     */
    private String code;

    /**
     * 匹配行政组织架构
     */
    private String standardOrgId;

    /**
     * 业务分管领导
     */
    private String deputyDir;
    /**
     * 业务分管领导
     */
    private String[] deputyDirs;
    /**
     * 业务分管领导名称
     */
    @Excel(name = "业务分管领导")
    private String deputyDirsName;

    /**
     * 所部技术负责人
     */
    private String techLeader;
    /**
     * 业务所技术负责人
     */
    private String whatBusinessTechLeader;
    /**
     * 所部技术负责人
     */
    private String[] techLeaders;
    /**
     * 所部技术负责人名称
     */
    @Excel(name = "业务部门技术负责人")
    private String techLeadersName;
    /**
     * 业务所技术负责人
     */
    private String[] whatBusinessTechLeaders;
    /**
     * 业务所技术负责人名称
     */
    @Excel(name = "业务所技术负责人")
    private String whatBusinessTechLeadersName;

    /**
     * 公章管理员
     */
    private String cachetManage;

    /**
     * 公章管理员
     */
    private String[] cachetManages;
    /**
     * 公章管理员名称
     */
    @Excel(name = "公章管理员名称")
    private String cachetManagesName;

    /**
     * 报表分组
     */
    @Excel(name = "报表分组")
    private String reportGroup;

    /**
     * 报表名称
     */
    @Excel(name = "报表名称")
    private String reportName;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String remark;

    /**
     * 部级审批人工号
     */
    private String leaderNo;

    /**
     * 所级审批人工号
     */
    private String whatBusinessLeaderNo;

    /**
     * 子部门
     */
    private List<SysDept> children = new ArrayList<SysDept>();

    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    @NotBlank(message = "部门名称不能为空")
    @Size(min = 0, max = 250, message = "部门名称长度不能超过255个字符")
    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getDeptShortName() {
        return deptShortName;
    }

    public void setDeptShortName(String deptShortName) {
        this.deptShortName = deptShortName;
    }

    public String getWhatBusiness() {
        return whatBusiness;
    }

    public void setWhatBusiness(String whatBusiness) {
        this.whatBusiness = whatBusiness;
    }

    public String getWhatBusinessName() {
        return whatBusinessName;
    }

    public void setWhatBusinessName(String whatBusinessName) {
        this.whatBusinessName = whatBusinessName;
    }

    @NotBlank(message = "显示顺序不能为空")
    public String getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(String orderNum) {
        this.orderNum = orderNum;
    }

    public String getLeader() {
        return leader;
    }

    public void setLeader(String leader) {
        this.leader = leader;
    }

    public String getWhatBusinessLeader() {
        return whatBusinessLeader;
    }

    public void setWhatBusinessLeader(String whatBusinessLeader) {
        this.whatBusinessLeader = whatBusinessLeader;
    }

    public String[] getLeaders() {
        return leaders;
    }

    public void setLeaders(String[] leaders) {
        this.leaders = leaders;
    }

    public String getLeadersName() {
        return leadersName;
    }

    public void setLeadersName(String leadersName) {
        this.leadersName = leadersName;
    }

    public String[] getWhatBusinessLeaders() {
        return whatBusinessLeaders;
    }

    public void setWhatBusinessLeaders(String[] whatBusinessLeaders) {
        this.whatBusinessLeaders = whatBusinessLeaders;
    }

    public String getWhatBusinessLeadersName() {
        return whatBusinessLeadersName;
    }

    public void setWhatBusinessLeadersName(String whatBusinessLeadersName) {
        this.whatBusinessLeadersName = whatBusinessLeadersName;
    }

    public void setLeaderNo(String leaderNo) {
        this.leaderNo = leaderNo;
    }

    public String getLeaderNo() {
        return leaderNo;
    }

    public void setWhatBusinessLeaderNo(String whatBusinessLeaderNo) {
        this.whatBusinessLeaderNo = whatBusinessLeaderNo;
    }

    public String getWhatBusinessLeaderNo() {
        return whatBusinessLeaderNo;
    }

    @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符")
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public String getGuid() {
        return guid;
    }

    public void setGuid(String guid) {
        this.guid = guid;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getStandardOrgId() {
        return standardOrgId;
    }

    public void setStandardOrgId(String standardOrgId) {
        this.standardOrgId = standardOrgId;
    }

    public String getDeputyDir() {
        return deputyDir;
    }

    public void setDeputyDir(String deputyDir) {
        this.deputyDir = deputyDir;
    }

    public String[] getDeputyDirs() {
        return deputyDirs;
    }

    public void setDeputyDirs(String[] deputyDirs) {
        this.deputyDirs = deputyDirs;
    }

    public String getDeputyDirsName() {
        return deputyDirsName;
    }

    public void setDeputyDirsName(String deputyDirsName) {
        this.deputyDirsName = deputyDirsName;
    }

    public String getTechLeader() {
        return techLeader;
    }

    public void setTechLeader(String techLeader) {
        this.techLeader = techLeader;
    }

    public String getWhatBusinessTechLeader() {
        return whatBusinessTechLeader;
    }

    public void setWhatBusinessTechLeader(String whatBusinessTechLeader) {
        this.whatBusinessTechLeader = whatBusinessTechLeader;
    }

    public String[] getTechLeaders() {
        return techLeaders;
    }

    public void setTechLeaders(String[] techLeaders) {
        this.techLeaders = techLeaders;
    }

    public String getTechLeadersName() {
        return techLeadersName;
    }

    public void setTechLeadersName(String techLeadersName) {
        this.techLeadersName = techLeadersName;
    }

    public String[] getWhatBusinessTechLeaders() {
        return whatBusinessTechLeaders;
    }

    public void setWhatBusinessTechLeaders(String[] whatBusinessTechLeaders) {
        this.whatBusinessTechLeaders = whatBusinessTechLeaders;
    }

    public String getWhatBusinessTechLeadersName() {
        return whatBusinessTechLeadersName;
    }

    public void setWhatBusinessTechLeadersName(String whatBusinessTechLeadersName) {
        this.whatBusinessTechLeadersName = whatBusinessTechLeadersName;
    }

    public String getReportGroup() {
        return reportGroup;
    }

    public void setReportGroup(String reportGroup) {
        this.reportGroup = reportGroup;
    }

    public String getReportName() {
        return reportName;
    }

    public void setReportName(String reportName) {
        this.reportName = reportName;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<SysDept> getChildren() {
        return children;
    }

    public void setChildren(List<SysDept> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("deptId", getDeptId())
                .append("parentId", getParentId())
                .append("ancestors", getAncestors())
                .append("deptName", getDeptName())
                .append("whatBusiness", getWhatBusiness())
                .append("orderNum", getOrderNum())
                .append("leader", getLeader())
                .append("whatBusinessLeader", getWhatBusinessLeader())
                .append("phone", getPhone())
                .append("email", getEmail())
                .append("status", getStatus())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("guid", getGuid())
                .append("code", getCode())
                .append("standardOrgId", getStandardOrgId())
                .append("deputyDir", getDeputyDir())
                .append("techLeader", getTechLeader())
                .append("reportGroup", getReportGroup())
                .append("reportName", getReportName())
                .append("remark", getRemark())
                .append("leaderNo", getLeaderNo())
                .append("whatBusinessLeaderNo", getWhatBusinessLeaderNo())
                .toString();
    }

	public String getCachetManage() {
		return cachetManage;
	}

	public void setCachetManage(String cachetManage) {
		this.cachetManage = cachetManage;
	}

    public String[] getCachetManages() {
        return cachetManages;
    }

    public void setCachetManages(String[] cachetManages) {
        this.cachetManages = cachetManages;
    }

    public String getCachetManagesName() {
        return cachetManagesName;
    }

    public void setCachetManagesName(String cachetManagesName) {
        this.cachetManagesName = cachetManagesName;
    }

    public static void main(String[] args) {
		Set<String> list = new HashSet<String>();
		list.add("a");
		list.add("a");
		list.add("a");
		list.add("a");
		list.add("a");
		list.add("a");
		System.out.println(list);
		list.remove("a");
		System.out.println(list);
	}
}
